//
//  THJumpManage.h
//  THBaseApp
//
//  Created by TryHone on 16/12/26.
//  Copyright © 2016年 TryHone. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JFBaseViewController.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, JUMP_TYPE) {
    JUMP_TYPE_ALL = 0,//优先使用push 找不到nav会才有模态跳转
    JUMP_TYPE_PUSH = 1,
    JUMP_TYPE_MODLE = 2
};


@interface JFJumpConfiguration : NSObject
@property(nonatomic,assign) BOOL animation;//是否需要动画
@property(nonatomic,assign) JUMP_TYPE type;//跳转类型
+(JFJumpConfiguration*)defaultJFJumpConfiguration;
@end


typedef void (^JFJumpManageVcBlock)(UIViewController * targetVc);


@interface JFJumpManage : NSObject



+(JFJumpManage *)shareInstance;
/**
 *  @author Alan, 16-12-26 14:12:43  
 *
 *  @brief 跳转到指定控制器
 *
 *  @param jumpidenfication 跳转目标唯一标识 eg:http://www.baidu.com ; app:AViewControl ; xib:a.buddle/AViewControl ; storyboard:a.buddle/xxx:AViewControl(storyboard暂不支持跨buddle); [AViewControl new] ; XXXX //注册过的 也可以直接填写标识
 *  @param dict             跳转去要的入参
 *  @param targetVcblock    获取到目标控制器 回调调用者 是否需要二次处理，不处理可以传nil
 *  @param config           跳转形态配置
 *  @param back             页面返回时如果数据回调会执行，可以传nil
 */
+(void)jump:(id __nonnull)jumpidenfication  param:(NSDictionary* __nullable )dict targetVc:(JFJumpManageVcBlock __nullable )targetVcblock config:(JFJumpConfiguration*)config  callBack:(baseCallBack __nullable )back completion:(void (^)(void) )completion;

+(void)backPreviousPage:(void (^)(void) )completion;

-(UIViewController *)getCurrentVC;
-(UINavigationController*)getCurrentNavVC;
-(UIWindow*)getCurrentWindow;


+ (void)jumpUserHomeWithUserId:(NSInteger)userId;

NS_ASSUME_NONNULL_END
@end
